{extend name="./public/base"/}
{block name="alt"}知识体系{/block}
{block name="alter"}知识体系列表{/block}
{block name="title"}BangBang知识体系{/block}
{block name="main"}<div class="row">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-block">
                                <div class="card-body">
                                        <table class="table table-striped  mt-3">
                                            <thead>
                                                <tr>
                                                    <th scope="col"><p class="text-center">状态</p></th>
                                                    <th scope="col"><p class="text-center">序号</p></th>
                                                    <th scope="col"><p class="text-center">知识体系名</p></th>
                                                    <th scope="col"><p class="text-center">知识体系首图</p></th>
                                                    <th scope="col"><p class="text-center">知识体系简介</p></th>
                                                    <th scope="col"><p class="text-center">操作</p></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                {volist name="knows" id="kn" key="k"}
                                                <tr>
                                                    <td>
                                                        {if condition="$kn.kstatus==0"}<p class="text-center text-success">正常</p>
                                                        {else/}<p class="text-center text-danger">封禁</p>
                                                        {/if}
                                                    </td>
                                                    <td><p class="text-center">{$k+($page-1)*10}</p></td>
                                                
                                                    <td><p class="text-center">{$kn.kname}</p></td>
                                                    
                                                  
                                                     <td class="text-center">
                                                        <img src="__STATIC__/knowledgepic/{$kn.kpic}" width="100px" height="100px" >
                                                    </td>
                                                   <td><p class="text-center">{$kn.kinfo}</p></td>
                                                    <td class="text-center">
                                                        

                                                <div class="btn-group">
                                                         <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
        <span class="glyphicon glyphicon-cog">Settings</span>
    </button>
    <ul class="dropdown-menu" role="menu">
        <li>
            <a class="text-danger" href="{:url('shield',['kid'=>$kn.kid])}">&nbsp;<i class="icon-ban"></i>解除/封禁</a>
        </li>

        <li>
            <a class="text-success" href="{:url('update',['kid'=>$kn.kid])}">&nbsp;<i class="icon-pencil">修改知识体系</i></a>
        </li>
        <li class="divider"></li>
        <li>
             <a class="text-success" href="{:url('details',['kid'=>$kn.kid])}">&nbsp;<i class="icon-info"></i>知识体系详情</a>
        </li>
        <!-- <li class="divider"></li>
        <li>
            <a href="#">分离的链接</a>
        </li> -->
    </ul>
</div>
                                                       
                                                      </td>
                                                    <td>
                                                </td>
                                                </tr>
                                                {/volist}
                                                
                                                
                                            </tbody>
                                        </table>
                                        {$knows->render()}
                                       
                                </div>
                            </div>
                        </div>
                    </div>
                </div>{/block}
{block name="tan"}
	<button class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal">添加新的知识体系</button>
	<br>
	<br>
	<!-- 模态框（Modal） -->
               <!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel">添加新的知识体系</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form" action="{:url('addknow')}" method="post" enctype="multipart/form-data">
<div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">知识体系名称</label>
    <div class="col-sm-10">
      <input type="text" name="kname" class="form-control" id="inputPassword" required>
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">知识体系首图</label>
    <div class="col-sm-10">
      <input type="file" name="kpic" class="form-control" id="inputPassword" required>
    </div>
  </div>
  <div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">知识体系简介</label>
    <div class="col-sm-10">
      <textarea class="form-control" name="kinfo" rows="3" required></textarea>
    </div>
  </div>

  <button type="submit" class="btn btn-primary">提交</button>
</form>
            </div>
           
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<!-- /.modal -->
{/block}